<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="RibbonSampleItemFormButton"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
	<DocumentationLinks>
		<Link Caption="MSDN: How to: Modify the User Interface Using Custom Actions" Url="http://msdn.microsoft.com/en-us/library/ms473643.aspx" Kind="Documentation"/>
		<Link Caption="MSDN: Server Ribbon XML" Url="http://msdn.microsoft.com/en-us/library/ff407290.aspx" Kind="Documentation"/>
		<Link Caption="MSDN: Default Server Ribbon Customization Locations" Url="http://msdn.microsoft.com/en-us/library/ee537543.aspx" Kind="Documentation"/>
	</DocumentationLinks>
	<xi:include href="../../../TypeAlias.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
	<Caption>Sample: Add Ribbon Button to Item Form</Caption>
	<Description>Add a Button to the ribbons in a Edit, New or Display Form</Description>
	<HostData Priority="3030">
		<Icon File="Help/Icons/icon_CustomActions.ico" />
		<CommandBar Menu="SPSFProjectCustomActions"/>
		<CommandBar Menu="SPSFFolderCustomActions"/>
		<spsf:MetaData
		  Visible="true"
		  BindingType="ElementManifestReference"
		  BindingTypeTemplate="ElementManifestReferenceTemplate"
		  TestType="BaseSiteFeatureRecipeRunner"
		  Enabled="true"
		  CreateVSTemplate="true"
		  SharePointVersions="14"
      FeatureScopes="Web;Site;WebApplication;Farm"
		  Category="CustomActions" xmlns:spsf="http://www.spalmblogger.de">
			<spsf:Authors>
				<spsf:Author>Torsten Mandelkow</spsf:Author>
			</spsf:Authors>
			<spsf:VersionHistory>
				<spsf:VersionHistoryEntry>1.0 Initial Recipe</spsf:VersionHistoryEntry>
			</spsf:VersionHistory>
			<spsf:WebPageContent>
				<![CDATA[]]>
			</spsf:WebPageContent>			
		</spsf:MetaData>
	</HostData>
	<Arguments>

		<xi:include href="../../BaseArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="BaseRibbonArguments.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Arguments/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<!-- optional target Location -->
		<Argument Name="CustomActionLocation" Required="true">
			<Converter Type="StringCollectionConverter" Values="CommandUI.Ribbon.EditForm|Customization appears on the edit form;CommandUI.Ribbon.NewForm|Customization appears on the new form;CommandUI.Ribbon.DisplayForm|Customization appears on the display form" />
			<ValueProvider Type="Evaluator" Expression="CommandUI.Ribbon.EditForm" />
		</Argument>

		<!-- Optional List Settings -->
		<Argument Name="CustomActionRegistrationType" Required="true">
			<ValueProvider Type="Evaluator" Expression="List" />
		</Argument>
		<Argument Name="CustomActionRegistrationId" Type="NameValueItem" Required="true" >
			<ValueProvider Type="DefaultNameValueItemProvider" Name="List" Value="101" />
		</Argument>
		
		<Argument Name="RibbonCommandUIDefinitionLocation" Type="NameValueItem" Required="true" >
			<ValueProvider Type="DefaultNameValueItemProvider" Name="Ribbon.DocLibListForm.Edit.Actions" Value="Ribbon.DocLibListForm.Edit.Actions" />
		</Argument>	

		<Argument Name="RibbonControlType" Required="true" >
			<Converter Type="StringCollectionConverter" Values="Button;CheckBox;Label" />
			<ValueProvider Type="Evaluator" Expression="Button" />
		</Argument>
		<Argument Name="RibbonControlImage16" Required="true" >
			<ValueProvider Type="Evaluator" Expression="RibbonIcon_$(RibbonActionName)_16.gif" />
		</Argument>
		<Argument Name="RibbonControlImage32" Required="true" >
			<ValueProvider Type="Evaluator" Expression="RibbonIcon_$(RibbonActionName)_32.gif" />
		</Argument>

	</Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
			<Pages>
				<Page Type="SPALM.SharePointSoftwareFactory.Library.CustomWizardPages.FeatureSelectionPage, SPALM.SharePointSoftwareFactory.Library" />
				<xi:include href="BaseRibbonPagesMinimal.include"  parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/p:Pages/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />
				<Page Height="350">
					<Title>Form Settings</Title>
					<Help>The appearance of the ribbon customization can be available globally or within list views or item forms.</Help>
					<Fields>
						<Field PanelType="SPALM.SharePointSoftwareFactory.Library.NameValueListViewPanel, SPALM.SharePointSoftwareFactory.Library" ValueName="CustomActionLocation" Label="Custom Action Location" >
							<Help>Required Text. Location element of the custom action.</Help>
						</Field>
					</Fields>
				</Page>
				<Page Height="350">
					<Title>Optional List Settings</Title>
					<Help>If needed the availability of a Ribbon element can be limited to a certain list type or content type.</Help>
					<Fields>
						<Field PanelType="SPALM.SharePointSoftwareFactory.Library.NameValueItemPanel, SPALM.SharePointSoftwareFactory.Library" ValueName="CustomActionRegistrationId" Label="List Type" >
							<Help>Select the list type where the action should be added.</Help>
							<Editor Type="SPALM.SharePointSoftwareFactory.Library.ListTemplateEditor, SPALM.SharePointSoftwareFactory.Library" />
						</Field>
					</Fields>
				</Page>
				<Page Height="350">
					<Title>Location Settings</Title>
					<Fields>
						<Field PanelType="SPALM.SharePointSoftwareFactory.Library.NameValueItemPanel, SPALM.SharePointSoftwareFactory.Library" ValueName="RibbonCommandUIDefinitionLocation" Label="Parent Ribbon Group" >
							<Help>Required Text. Specifies the existing ribbon group into which the new button should be added.</Help>
							<Editor Type="SPALM.SharePointSoftwareFactory.Library.RibbonGroupEditor, SPALM.SharePointSoftwareFactory.Library" />
						</Field>
					</Fields>
				</Page>
			</Pages>
		</Wizard>
	</GatheringServiceData>

	<Actions CoordinatorServiceType="ConditionalCoordinator">

		<xi:include href="../../BaseStartingActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="../BaseFeatureActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<xi:include href="BaseRibbonActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />

		<!-- add button icon 16-->
		<Action
		  Name="AddIcon16"
		  Type="AddFileToItemAction"
		  DeploymentType="TemplateFile"
		  DeploymentPath="Images\$(SafeAppName)"
		  SourceFileName="Text/Ribbons/CustomAction16.gif"
		  TargetFileName="$(RibbonControlImage16)">
			<Input Name="ExcludeCondition" RecipeArgument="ProjectIsSandboxedSolution" />
      <Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
		</Action>

		<!-- add button icon 32-->
		<Action
		  Name="AddIcon32"
		  Type="AddFileToItemAction"
		  DeploymentType="TemplateFile"
		  DeploymentPath="Images\$(SafeAppName)"
		  SourceFileName="Text/Ribbons/CustomAction32.gif"
		  TargetFileName="$(RibbonControlImage32)">
			<Input Name="ExcludeCondition" RecipeArgument="ProjectIsSandboxedSolution" />
      <Input Name="ParentProjectFolder" ActionOutput="CreateElementsXml.CreatedElementFolder" />
		</Action>

		<xi:include href="../../BaseFinalActions.include" parse="xml" xpointer="xmlns(p=http://schemas.microsoft.com/pag/gax-core) xpointer(/p:Actions/*)" xmlns:xi="http://www.w3.org/2001/XInclude" />


	</Actions>

</Recipe>